﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Projecturo.Model;

namespace Projecturo.ProjecturoClient.ViewModel.Project
{
    public class TicketStateViewModel : ViewModelBase
    {
        private TicketState state;

        public string Name
        {
            get { return state.Name; }
            set
            {
                if (state.Name == value)
                    return;
                state.Name = value;
                OnPropertyChanged("Name");
            }
        }

        public string Color
        {
            get { return state.Color; }
            set
                {
                    if (state.Color == value)
                        return;
                    state.Color = value;
                    OnPropertyChanged("Color");
                }
        }

        public override void SetModel(object model)
        {
            state = model as TicketState;
        }
    }
}
